package com.example.zhihu.presenter;

import com.example.zhihu.base.BasePresenter;
import com.example.zhihu.bean.DailyNewsBean;
import com.example.zhihu.model.DailyNewsCallBack;
import com.example.zhihu.model.DailyNewsModel;
import com.example.zhihu.view.DailyNewsView;

public class DailyPresenter extends BasePresenter<DailyNewsView> implements DailyNewsCallBack {
    private DailyNewsModel model;
    @Override
    protected void initModel() {
        this.model=new DailyNewsModel();
        addModel(model);
    }
    public void getdaily(){
        model.addDailyModel(this);
    }
    @Override
    public void onSuccess(DailyNewsBean data) {
        mview.onSuccess(data);
    }

    @Override
    public void onFali(String error) {
        mview.onFail(error);
    }
}
